﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Restful_Api.Migrations
{
    public partial class AddEmployee : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("7cad215a-131c-4d7b-9167-c9a755143425"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("9e48c982-c52b-46d9-bc9c-d98da8fee770"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("ac83f843-9cd2-449e-a5f6-656229c617d5"));

            migrationBuilder.InsertData(
                table: "Companies",
                columns: new[] { "Id", "Introduction", "Name" },
                values: new object[,]
                {
                    { new Guid("5d5e5446-9726-47de-8852-d24118988304"), "微软的公司简介", "微软公司" },
                    { new Guid("5e19c884-8854-4e88-b4c7-85ef02ef8e16"), "谷歌的公司简介", "Google" },
                    { new Guid("a48c8ae6-e79c-4ce1-9c02-e775146ccc4c"), "BiliBili的公司简介", "BiliBili" }
                });

            migrationBuilder.InsertData(
                table: "Employees",
                columns: new[] { "Id", "CompanyId", "DateOfBirth", "EmployeeNo", "FistName", "Gender", "LastName" },
                values: new object[,]
                {
                    { new Guid("8dbc379e-9a57-4fe6-8653-30c93ec573af"), new Guid("5d5e5446-9726-47de-8852-d24118988304"), new DateTime(2020, 8, 10, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "张", 1, "三" },
                    { new Guid("5c97ceac-13e8-4dae-ad36-1d10ca4909ac"), new Guid("5d5e5446-9726-47de-8852-d24118988304"), new DateTime(2020, 8, 15, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "李", 1, "四" },
                    { new Guid("0cb20dec-2b82-4788-8e31-cd9bb5d2ef44"), new Guid("5e19c884-8854-4e88-b4c7-85ef02ef8e16"), new DateTime(2020, 8, 20, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "小", 2, "Lu" },
                    { new Guid("e1505926-adb9-46e9-a974-258b679a6265"), new Guid("a48c8ae6-e79c-4ce1-9c02-e775146ccc4c"), new DateTime(2020, 8, 29, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "小", 1, "江" }
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("5d5e5446-9726-47de-8852-d24118988304"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("5e19c884-8854-4e88-b4c7-85ef02ef8e16"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("a48c8ae6-e79c-4ce1-9c02-e775146ccc4c"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("0cb20dec-2b82-4788-8e31-cd9bb5d2ef44"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("5c97ceac-13e8-4dae-ad36-1d10ca4909ac"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("8dbc379e-9a57-4fe6-8653-30c93ec573af"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("e1505926-adb9-46e9-a974-258b679a6265"));

            migrationBuilder.InsertData(
                table: "Companies",
                columns: new[] { "Id", "Introduction", "Name" },
                values: new object[] { new Guid("7cad215a-131c-4d7b-9167-c9a755143425"), "微软的公司简介", "微软公司" });

            migrationBuilder.InsertData(
                table: "Companies",
                columns: new[] { "Id", "Introduction", "Name" },
                values: new object[] { new Guid("9e48c982-c52b-46d9-bc9c-d98da8fee770"), "谷歌的公司简介", "Google" });

            migrationBuilder.InsertData(
                table: "Companies",
                columns: new[] { "Id", "Introduction", "Name" },
                values: new object[] { new Guid("ac83f843-9cd2-449e-a5f6-656229c617d5"), "BiliBili的公司简介", "BiliBili" });
        }
    }
}
